package com.cloudlead.plugin.security.query;

import static com.mysema.query.types.PathMetadataFactory.*;
import com.cloudlead.plugin.security.entity.EScRoleHasPrivilege;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QScRoleHasPrivilege is a Querydsl query type for EScRoleHasPrivilege
 */
@Label("角色对应的权限查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QScRoleHasPrivilege extends RelationalPathBase<EScRoleHasPrivilege> {

    private static final long serialVersionUID = 551860564;

    public static final QScRoleHasPrivilege scRoleHasPrivilege = new QScRoleHasPrivilege("sc_role_has_privilege");

    public class PrimaryKeys {

        public final PrimaryKey<EScRoleHasPrivilege> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScPrivilege> scRolePrivilegeScPrivilege1Fk = createForeignKey(scPrivilegeId, "id");

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScRole> scRolePrivilegeScRole1Fk = createForeignKey(scRoleId, "id");

    }

    public final StringPath id = createString("id");

    public final StringPath scPrivilegeId = createString("scPrivilegeId");

    public final StringPath scRoleId = createString("scRoleId");

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QScRoleHasPrivilege(String variable) {
        super(EScRoleHasPrivilege.class, forVariable(variable), "null", "sc_role_has_privilege");
        addMetadata();
    }

    public QScRoleHasPrivilege(String variable, String schema, String table) {
        super(EScRoleHasPrivilege.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QScRoleHasPrivilege(Path<? extends EScRoleHasPrivilege> path) {
        super(path.getType(), path.getMetadata(), "null", "sc_role_has_privilege");
        addMetadata();
    }

    public QScRoleHasPrivilege(PathMetadata<?> metadata) {
        super(EScRoleHasPrivilege.class, metadata, "null", "sc_role_has_privilege");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(scPrivilegeId, ColumnMetadata.named("sc_privilege_id").withIndex(3).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(scRoleId, ColumnMetadata.named("sc_role_id").withIndex(2).ofType(Types.CHAR).withSize(24).notNull());
    }

}

